import request from '@/utils/request'

// 查询任务分类列表
export function listCategories(query) {
  return request({
    url: '/config/categories/list',
    method: 'get',
    params: query
  })
}

// 查询任务分类详细
export function getCategories(CategoryId) {
  return request({
    url: '/config/categories/' + CategoryId,
    method: 'get'
  })
}

// 新增任务分类
export function addCategories(data) {
  return request({
    url: '/config/categories',
    method: 'post',
    data: data
  })
}

// 修改任务分类
export function updateCategories(data) {
  return request({
    url: '/config/categories',
    method: 'put',
    data: data
  })
}

// 删除任务分类
export function delCategories(CategoryId) {
  return request({
    url: '/config/categories/' + CategoryId,
    method: 'delete'
  })
}
